package com.qpkj.common.utils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

public class ConstantPropertiesUtil implements InitializingBean{
    @Value("${aliyun.oss.endpoint}")
    private String endpoint;//地域节点

    @Value("${aliyun.oss.accessKeyId}")
    private String keyId;//id

    @Value("${aliyun.oss.keysecret}")
    private String keySecret;//秘钥

    @Value("${aliyun.oss.imageBucket}")
    private String bucketName;//项目名称

    public static String END_POINT;
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    public static String BUCKET_NAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = endpoint;
        ACCESS_KEY_ID = keyId;
        ACCESS_KEY_SECRET = keySecret;
        BUCKET_NAME = bucketName;
    }
}
